/**
 * <p>Copyright:Copyright(c) 2019</p>
 * <p>Company:Professional</p>
 * <p>Package:com.cesgroup.zw.spring.boot.echarts.model.series</p>
 * <p>File:Category.java</p>
 * <p>类更新历史信息</p>
 * @todo chanlong(陈龙) 创建于 May 24, 2019 5:10:55 PM
 */
package com.cesgroup.zw.spring.boot.echarts.model.series;

import com.cesgroup.zw.spring.boot.echarts.model.style.ItemStyle;
import com.cesgroup.zw.spring.boot.echarts.model.style.LabelStyle;
import com.cesgroup.zw.spring.boot.echarts.model.style.SymbolStyle;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>描述: 节点分类的类目</p>
 * <p>Company: Professional</p>
 * @author chanlong(陈龙)
 * @date May 24, 2019 5:10:55 PM
 * @version 1.0.2019
 */
@Data @SuppressWarnings("serial")
@EqualsAndHashCode(callSuper = true)
public class Category extends SymbolStyle {
	
	/** 类目名称，用于和 legend 对应以及格式化 tooltip 的内容 */
	private	String name;
	
	/** 该类目节点的样式 */
	private ItemStyle itemStyle;
	
	/** 该类目节点标签的样式 */
	private LabelStyle label;
	
	/** 该类目节点的高亮样式 */
	private Emphasis emphasis;
	
	public Category(String name) {
		this.name = name;
	}
	
	public Category(String name, LabelStyle label) {
		this.setName(name);
		this.setLabel(label);
	}
	
	public Category(String name, Emphasis emphasis) {
		this.setName(name);
		this.setEmphasis(emphasis);
	}
	
	public Category(String name, ItemStyle itemStyle) {
		this.setName(name);
		this.setItemStyle(itemStyle);
	}
	
	public Category(String name, SymbolStyle symbol) {
		this.setName(name);
		this.setSymbol(symbol.getSymbol());
		this.setSymbolSize(symbol.getSymbolSize());
		this.setSymbolOffset(symbol.getSymbolOffset());
		this.setSymbolRotate(symbol.getSymbolRotate());
		this.setSymbolKeepAspect(symbol.getSymbolKeepAspect());
	}
	
	public Category(String name, LabelStyle label, ItemStyle itemStyle) {
		this(name, label);
		this.setItemStyle(itemStyle);
	}
	
	public Category(String name, LabelStyle label,  Emphasis emphasis) {
		this(name, label);
		this.setEmphasis(emphasis);
	}
	
	public Category(String name, ItemStyle itemStyle, Emphasis emphasis) {
		this(name, itemStyle);
		this.setEmphasis(emphasis);
	}
	
	public Category(String name, LabelStyle label, ItemStyle itemStyle, Emphasis emphasis) {
		this(name, label, itemStyle);
		this.setEmphasis(emphasis);
	}
}
